﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mappings;

namespace Apollo
{
    [NHibernateEntity(Table = "TimeTableItems", Lazy = true)]
    public class TimeTableItem : ILegacy, IStateable
    {
        public TimeTableItem() { }

        [PrimaryKey]
        public virtual int Id { get; set; }

        [Property]
        public virtual string Name { get; set; }

        [BelongsTo(Column = "ID_Contract")]
        public virtual Contract Contract { get; set; }

        [BelongsTo(Column = "ID_TimeTable")]
        public virtual TimeTable TimeTable { get; set; }

        [BelongsTo(Column = "ID_Employee")]
        public virtual Employee Employee { get; set; }

        [Property]
        public virtual DateTime StartDate { get; set; }

        [Property]
        public virtual DateTime? EndDate { get; set; }

        [Property]
        public virtual State State { get; set; }


        [Property]
        public virtual DateTime? PaymentDate { get; set; }

        [Property]
        public virtual int Year { get; set; }

        [Property]
        public virtual int TimeTableNumber { get; set; }

        [Property]
        public virtual int ID_Calcul_OXY { get; set; }

        [Property]
        public virtual int ID_CommissionCalculation { get; set; }

        [Property]
        public virtual int CommissionCalculationMonth { get; set; }

        [Property]
        public virtual int CommissionCalculationYear { get; set; }



        [Property]
        public virtual double GrossValue { get; set; }

        [BelongsTo(Column = "ID_Currency")]
        public virtual Currency Currency { get; set; }

        [Property]
        public virtual string LegacyApplication { get; set; }

        [Property]
        public virtual string LegacyID { get; set; }

        
        [Property]
        public virtual double ExchangeRate { get; set; }

        
    }
}
